//
//  UIViewController+ShowCustomView.m
//  dyss_v2
//
//  Created by LXF on 16/2/18.
//  Copyright © 2016年 First Facility. All rights reserved.
//

#import "UIViewController+ShowCustomView.h"

#import "UIView+TYAlertView.h"

@implementation UIViewController (ShowCustomView)

-(void)showAlertViewWithCustomView:(UIView *)view{
    [self showAlertViewWithCustomView:view BackgoundTapDismissEnable:NO];
}
-(void)showAlertViewWithCustomView:(UIView *)view BackgoundTapDismissEnable:(BOOL)backgoundTapDismissEnable{
    
//    [view showInWindowWithBackgoundTapDismissEnable:backgoundTapDismissEnable];
    [view showInController:self preferredStyle:TYAlertControllerStyleAlert transitionAnimation:TYAlertTransitionAnimationScaleFade backgoundTapDismissEnable:backgoundTapDismissEnable];
}

- (void)showActionSheetWithCustomView:(UIView *)view BackgoundTapDismissEnable:(BOOL)backGoundTapDismissEnable {
    [view showInController:self preferredStyle:TYAlertControllerStyleActionSheet backgoundTapDismissEnable:backGoundTapDismissEnable];
}

@end


@implementation UIView (ShowCustomAlertView)

-(void)hideAlertView{
    [self hideView];
}

@end